package com.originskyseed.platform.course.mapper;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.course.model.PaperRelateUser;

/**
 * 试卷关联作答用户信息Mapper类（OSI_PAPER_RELATE_USER）
 *
 * @author Tangwanghui
 */
public interface PaperRelateUserMapper {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(PaperRelateUser record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(PaperRelateUser record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(PaperRelateUser record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(PaperRelateUser record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PaperRelateUser selectByPrimaryKey(String id) throws Exception;

	/**
	 * 通过作答人ID查询
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PaperRelateUser selectByUserId(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<PaperRelateUser> selectList(PaperRelateUser record) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public PaperRelateUser selectByPaperRelateUser(PaperRelateUser record) throws Exception;

	/**
	 * 查询是否参加考试
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public PaperRelateUser selectRelateUserIsExam(PaperRelateUser record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<PaperRelateUser> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 分页查询评分列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<PaperRelateUser> gradeSelectPaperListByPage(Map<String, Object> params) throws Exception;

}
